Skip to content

sdk: add Go SDK for shreds subscription program#3391

Merged
snormore merged 4 commits intomainfrom
snor/sdk-shreds-go
Mar 27, 2026
Merged

sdk: add Go SDK for shreds subscription program#3391
snormore merged 4 commits intomainfrom
snor/sdk-shreds-go

Conversation

@snormore
Copy link
Copy Markdown
Contributor

Summary

  • Add read-only Go SDK for deserializing shred subscription program accounts (epoch state, seat assignments, pricing, settlement, validator client rewards)
  • Include PDA derivation helpers, RPC account fetchers, and a fetch example CLI
  • Add compatibility tests against Rust-generated binary fixtures and unit tests for discriminators and PDAs
  • Wire into sdk Makefile (make sdk-test, make compat-test, make examples-go) and update README

Note: ~1800 lines but ~780 are tests/fixtures — the non-test SDK code is within the recommended PR size.

Testing Verification

  • go test ./sdk/shreds/go/... passes all unit and compat tests
  • PDA derivation matches expected addresses from Rust reference
  • Discriminator validation rejects mismatched and truncated data
  • Compat tests deserialize Rust-generated fixtures and verify field-level correctness

@snormore snormore force-pushed the snor/sdk-shreds-go branch from a264e98 to ce97b99 Compare March 27, 2026 15:32
@snormore snormore marked this pull request as ready for review March 27, 2026 16:44
@snormore snormore force-pushed the snor/sdk-shreds-go branch from 7b992a6 to dd82612 Compare March 27, 2026 17:02
Add read-only Go SDK for deserializing shred subscription program
accounts including epoch state, seat assignments, pricing, settlement,
and validator client rewards. Includes PDA derivation, RPC helpers,
compatibility tests against Rust-generated fixtures, and a fetch example.
@snormore snormore force-pushed the snor/sdk-shreds-go branch from dd82612 to 21846c5 Compare March 27, 2026 19:04
@snormore snormore merged commit 49cd0c9 into main Mar 27, 2026
33 checks passed
@snormore snormore deleted the snor/sdk-shreds-go branch March 27, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants